﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fundamental.Boxing;
using Fundamental.DynamicType;
using Fundamental.OperatorOverload;
using Fundamental.Method;
using Fundamental.Parameterfull;

namespace Fundamental
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("**************Boxing**************");
            BoxingDemo demo = new BoxingDemo();
            demo.Launch();


            Console.WriteLine("**************Dynamic Type**************");
            DynamicPrimitive dynamice = new DynamicPrimitive();
            dynamice.Launch();

            Console.WriteLine("**************Operator Overload**************");
            Overload o1 = new Overload(1,1);
            Overload o2 = new Overload(100, 100);
            Console.WriteLine(o1 + o2);
            Overload o3 = (Overload)("100,200");
            Console.WriteLine(o3);

            Console.WriteLine("**************Extension Method**************");
            string str = "1,2,3,XX,5,6,7,9,10,20000";
            int[] array = str.ToIntegerArray(',');
            foreach(var element in array)
            {
                Console.WriteLine(element);
            }

            Console.WriteLine("**************Partial Method**************");
            Partial p = new Partial();
            p.Name = "Partial Name";
            p.Name = "New Name";

            Console.WriteLine("**************Optional & Default Parameter**************");
            Optional optionalParam = new Optional();
            optionalParam.M();
            optionalParam.M(100);
            optionalParam.M(200,DateTime.MaxValue);
            optionalParam.M(300,DateTime.Now,Guid.NewGuid());

            Console.WriteLine("**************Anonymous Type**************");
            AnonymousType at = new AnonymousType();
            at.Print();
            at.TestTuple();

            Console.ReadLine();
        }
    }
}
